<template>
    <div class="list-item2" @click="toCdetail(v.id)">
        <p class="list-item2-title">{{v.title}}</p>
        <p>共点击量 {{ v.sales_base}}</p>
        <div>
            <img :src="v.cover_img" alt="">
        </div>
        <div class="list-item1-bottom">
            <p>275人报名</p>
            <span class="a"> {{v.price==0 ? '免费':v.price }}</span>
        </div>

    </div>
</template>

<script>
export default {
    props: ['v'],
    mounted() {
        // console.log(this.v)
    },
    methods:{
        toCdetail(id){
            this.$router.push({path:"/cdetail",query:{"id":id}})
        }
    }
};
</script>

<style lang="scss" scoped>
.list-item2 {
    height: 130px;
    background: white;
    margin-bottom: 10px;
    font-size: 12px;
    color: #999;
    .list-item1-bottom {
        display: flex;
        justify-content: space-between;
    }

    img {
        width: 30px;
        height: 30px;
    }
}

.list-item2-title {
    font-size: 18px;
    color: black;
}
.a{
    color: limegreen;
    font-size: 14px;
}
</style>